package org.neuedu.ssmp.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.neuedu.ssmp.crm.entity.Ls;

import java.util.List;

public interface LsMapper extends BaseMapper<Ls> {
    @Select("select MID(lost_day,1,4) lostDay,f.name,a.username,f.lost_cause from sys_user a join (select user_id,lost_day,lost_cause,name from customer d join customer_lost e on d.id=e.customer_id) f on a.id=f.user_id")
    List<Ls> user();
    @Select("select MID(lost_day,1,4) lostDay,f.name,a.username,f.lost_cause from sys_user a join (select user_id,lost_day,lost_cause,name from customer d join customer_lost e on d.id=e.customer_id) f on a.id=f.user_id where name like '%${name}%' and username like '%${username}%'")
    List<Ls> userl(String name,String username);
}
